//
//  FontAndColorMacros.swift
//  UniversalProject-Swift
//
//  Created by apple on 2019/7/9.
//  Copyright © 2019 apple. All rights reserved.
//

//字体大小和颜色配置

import Foundation
import UIKit
import BFKit
import Kingfisher
//字体大小和颜色配置

// MARK: - 间距区
//默认间距
let KNormalSpace = 12.0

// MARK: - 颜色区
//主题色 导航栏颜色
let CNavBgColor = UIColor(hex: "00AE68")
let CNavBgFontColor = UIColor(hex: "ffffff")
//默认字体颜色
let CDefaultFontColor = UIColor.init(hex: "333333")
//默认页面背景色
let CViewBgColor = UIColor.init(hex: "f2f2f2")
//分割线颜色
let CLineColor = UIColor.init(hex: "ededed")
//次级字色
let CFontColor1 = UIColor.init(hex: "1f1f1f")
//再次级字色
let CFontColor2 = UIColor.init(hex: "5c5c5c")

var kColor:(String) -> UIColor = {hex in
    return UIColor.init(hex: hex)
}

// MARK: - 字体区
//字体大小
var kFont:(CGFloat) -> UIFont = {size in
    return UIFont.systemFont(ofSize: size)
}
// MARK: - 图片区
//图片名字
func IMAGE_NAMED(imageName:String) -> UIImage {
    return UIImage.init(named: imageName)!
}
//图片地址
var kURL:(String) -> NSURL = {url in
    return NSURL.init(fileURLWithPath: url)
}

func ImageWithFile(pointer:String) -> UIImage {
    return UIImage.init(contentsOfFile: Bundle.main.path(forResource: String.init(format: "%@@%dx", [pointer, UIScreen.main.nativeScale]), ofType: "png")!)!
}

// MARK: - 自定义区
let kPortraitPlaceHolderName = "knb_default_user"
let kPortraitPlaceHolder = IMAGE_NAMED(imageName: kPortraitPlaceHolderName)
